import type { Metadata, Viewport } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({
  subsets: ['latin'],
  display: 'swap',
  preload: true,
  variable: '--font-inter',
})

export const metadata: Metadata = {
  title: '奥数学院 - 中小学生奥数学习平台',
  description: '专为中小学生设计的奥数学习平台，提供系统化的奥数知识点学习、每日练习、挑战模式等功能。',
  keywords: '奥数, 数学, 小学, 初中, 学习, 练习, 题库',
  authors: [{ name: '奥数学院团队' }],
  icons: {
    icon: '/favicon.svg',
    apple: '/favicon.svg',
  },
}

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
  themeColor: '#4facfe',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="zh-CN">
      <body className={`${inter.className} antialiased`}>
        <div className="min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-gray-900 dark:via-blue-900 dark:to-purple-900">
          {children}
        </div>
      </body>
    </html>
  )
}
